﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="plugin_List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <h2>插件管理</h2>
     <div>排序方式:<asp:DropDownList ID="ddlsort" runat="server" 
             onselectedindexchanged="ddlsort_SelectedIndexChanged" AutoPostBack="true" 
             Width="100px">
         <asp:ListItem Value="0">网站</asp:ListItem>
         <asp:ListItem Value="1">分类</asp:ListItem>
            </asp:DropDownList></div>     

    </div>
           <asp:Repeater ID="rptPlugin" runat="server" EnableTheming="True" EnableViewState="False">
            <HeaderTemplate>
                <table border="1" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1">
                    <tr>
                    <th>序号</th>
                    <th>有效性</th>
                        <th  align="center">
                            编辑
                        </th>
                         <th align="center">
                            插件编号
                        </th>
                        <th align="center">
                            插件名称
                        </th>
                        <th align="center">
                            采集深度
                        </th>
                        <th align="center">
                            当前状态
                        </th>
                        <th align="center">
                            线程数
                        </th>
                         <th align="center">
                            是否有效
                        </th>
                         <th align="center">
                            所属网站
                        </th>
                          <th align="center">
                            所属分类
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                <td><%# Container.ItemIndex+1 %></td>
                   <td align="center">
                        <a href="validate.aspx?pluginId=<%# DataBinder.Eval(Container.DataItem,"plugin_id") %>" target="if_validate">检查</a>
                    </td>
                    <td align="center">
                        <a href="manage.aspx?pluginId=<%# DataBinder.Eval(Container.DataItem,"plugin_id") %>">编辑</a>
                    </td>
                 <td align="center">
                        <%# DataBinder.Eval(Container.DataItem,"plugin_id") %>
                      
                    </td>
                    <td align="left">
                       <%# DataBinder.Eval(Container.DataItem,"name") %>
                    </td>
                    <td align="center">
                        <%# DataBinder.Eval(Container.DataItem,"dig_depth") %>
                    </td>
                    <td align="center">
                        <%# DataBinder.Eval(Container.DataItem, "run_status")%>
                    </td>
                    <td width="40%" align="center">
                        <%# DataBinder.Eval(Container.DataItem, "thread_number")%>
                    </td>
                    <td align="center">

                        <%# FormatIsValid(DataBinder.Eval(Container.DataItem, "is_valid"))%>
                    </td>
                    
                     <td align="center">
                      
                        <%# GetWebSiteName(Convert.ToInt32(DataBinder.Eval(Container.DataItem,"site_id")))%>
                    </td>
                     <td align="left">
                        <%# GetCategoryName(Convert.ToString(DataBinder.Eval(Container.DataItem,"category_id")))%>
                    </td>
                </tr>
            </ItemTemplate>
          
            <FooterTemplate>
                </table>
                </FooterTemplate>
        </asp:Repeater>
        <hr />
        <iframe name="if_validate" width="100%" height=420 frameborder=0 scrolling="auto"></iframe>
    </form>
</body>
</html>
